class TimePlugin {
    constructor() {
        this.container = document.getElementById('plugin-container');
    }

    initialize(kernel) {
        this.kernel = kernel;
        this.createUI();
    }

    createUI() {
        const dateDisplay = document.createElement('div');
        dateDisplay.id = 'date-display';
        dateDisplay.style.marginTop = '10px';
        this.container.appendChild(dateDisplay);
    }

    onTimeUpdate(date) {
        const dateDisplay = document.getElementById('date-display');
        dateDisplay.textContent = date.toLocaleDateString();
    }
}

// Register the plugin with the kernel
const timePlugin = new TimePlugin();
window.addEventListener('DOMContentLoaded', () => {
    kernel.registerPlugin('timePlugin', timePlugin);
}); 